<include file="Common:layout" />
<style>
    .ncm-goods-gift {
        text-align: left;
    }
    .ncm-goods-gift ul {
        display: inline-block;
        font-size: 0;
        vertical-align: middle;
    }
    .ncm-goods-gift li {
        display: inline-block;
        letter-spacing: normal;
        margin-right: 4px;
        vertical-align: top;
        word-spacing: normal;
    }
    .ncm-goods-gift li a {
        background-color: #fff;
        display: table-cell;
        height: 30px;
        line-height: 0;
        overflow: hidden;
        text-align: center;
        vertical-align: middle;
        width: 30px;
    }
    .ncm-goods-gift li a img {
        max-height: 30px;
        max-width: 30px;
    }

    a.green{

        background: #fff none repeat scroll 0 0;
        border: 1px solid #f5f5f5;
        border-radius: 4px;
        color: #999;
        cursor: pointer !important;
        display: inline-block;
        font-size: 12px;
        font-weight: normal;
        height: 20px;
        letter-spacing: normal;
        line-height: 20px;
        margin: 0 5px 0 0;
        padding: 1px 6px;
        vertical-align: top;
    }

    a.green:hover { color: #FFF; background-color: #1BBC9D; border-color: #16A086; }

    .ncap-order-style .ncap-order-details{
        margin:20px auto;
    }
    .contact-info h3,.contact-info .form_class{
        display: inline-block;
        vertical-align: middle;
    }
    .form_class i.fa{
        vertical-align: text-bottom;
    }
</style>
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title"><a class="back" href="javascript:history.go(-1)" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>
            <div class="subject">
                <h3>代理管理</h3>
                <h5>代理详情与代理相关信息展示</h5>
            </div>
        </div>

    </div>
    <div class="titile">
        <h3></h3>
    </div>

    <div class="ncap-order-details" style="border: 0;">
        <form id="order-action">
            <div class="tabs-panels">
                <div class="misc-info">
                    <h3>基本信息</h3>
                    <dl>
                        <dt>代理姓名：</dt>
                        <dd>{$agent['agent_name']}</dd>
                        <dt>最大消费：</dt>
                        <dd><strong class="red_common">{$agent['credit_line']}</strong></dd>
                        <dt>预存款：</dt>
                        <dd><strong class="red_common">{$agent['money']}</strong></dd>
                    </dl>
                    <dl>
                        <dt>手机号：</dt>
                        <dd>{$agent['mobile']}</dd>
                        <dt>注册码：</dt>
                        <dd>
                            <if condition="$agent['invitation_code'] eq '*'">
                                已注册<else/>{$agent['invitation_code']}
                            </if>
                        </dd>
                        <dt>注册时间：</dt>
                        <dd>
                            <if condition="$agent['invitation_code'] eq '*'">
                                {$agent['reg_time']}<else/>未注册
                            </if>
                        </dd>
                    </dl>
                    <dl>
                        <dt>代理品牌：</dt>
                        <dd>{$agent_brands}</dd>
                    </dl>
                </div>

                <div class="goods-info">
                    <h4>收货地址</h4>
                    <table>
                        <thead>
                        <tr>
                            <th>代理名称</th>
                            <th>详细地址</th>
                            <th>收货人</th>
                            <th>收货人号码</th>
                            <th>是否默认</th>
                        </tr>
                        </thead>
                        <tbody>
                        <notempty name="agentAddress['address']">
                            <volist name="agentAddress['address']" id="vo" key="k">
                                <tr>
                                    <td class="w80">{$agentAddress['agent_name']}</td>
                                    <td>{$vo['detail_address']}</td>
                                    <td class="w80">{$vo['consignee']}</td>
                                    <td class="w80">{$vo['mobile']}</td>
                                    <td class="w100"><if condition="$vo['is_default'] eq 1">是<else/>否</if></td>
                                </tr>
                            </volist>
                            <else/>
                            <td colspan="5">无收货地址</td>
                        </notempty>
                    </table>
                </div>
                <div class="total-amount contact-info"></div>
                <div class="goods-info">
                    <h4>引荐记录 &nbsp;&nbsp;&nbsp;&nbsp;（共：{$rec_count} 个）</h4>
                    <table>
                        <thead>
                        <tr>
                            <th>引荐代理姓名</th>
                            <th>引荐时间</th>
                            <th>引荐时级别</th>
                        </tr>
                        </thead>
                        <tbody>
                        <foreach name="recommend_agents" item="rec">
                            <tr>
                                <td class="text-center">{$rec['agent_name']}</td>
                                <td class="text-center">{$rec['add_time']|date='Y-m-d',###}</td>
                                <td class="text-center">{:GetRankNameById($rec['rank_id'])}</td>
                            </tr>
                        </foreach>
                        <tfoot><tr><td colspan="3">{$page}</td></tr></tfoot>
                    </table>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>